<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8" %>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@ taglib prefix="form" uri="http://www.springframework.org/tags/form" %>
<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt" %>


<div class="col-md-offset-2 col-md-7 well">
    <h3>Please sign in</h3>

    <c:if test="${not empty error}">
        <div class="alert alert-dismissable alert-danger">
            <p>${error}</p>
        </div>
    </c:if>
    <c:if test="${not empty message}">
        <div class="alert alert-dismissable alert-success">
            <p>${message}</p>
        </div>
    </c:if>
    <p>Admin account: admin - admin</p>

    <form name='loginForm' action="login" method='POST' class="form-horizontal" role="form">
        <div class="form-group">
            <label for="userLogin" class="col-sm-4 control-label">User:</label>

            <div class="col-sm-8">
                <input type="text" id="userLogin" name="userLogin" class="form-control"
                       placeholder="Enter user name">
            </div>
        </div>
        <div class="form-group">
            <label for="userPassword" class="col-sm-4 control-label">Password:</label>

            <div class="col-sm-8">
                <input type="password" id="userPassword" name="userPassword" class="form-control"
                       placeholder="Enter password">
            </div>
        </div>

        <div class="form-group">
            <div class="col-sm-offset-4 col-sm-8">
                <input name="submit" type="submit" class="btn btn-primary" value=" Sign In "/>
            </div>
        </div>
    </form>
    or <a href="<c:url value="/register" />">register new account</a>
</div>
